<?php
/*----------------------------------------------------------------------------------------------
Kit Applicatif PHP
Noyau générique d'applications PHP / generic kernel for PHP applications
noyau 0.4 / PHP 4
http://code.fredbird.org/wak

// boite a outils texte et xml


file version 2004-11-25 14:13:50
-------------------------------------------------------------------------------------------------*/

class waktextXmlTool extends wakCoreComponent {
/*-------------------------------------------------------------------------------------------------
                                                                              parametres par defaut
-------------------------------------------------------------------------------------------------*/
	var $default_parameters=array();
/*-------------------------------------------------------------------------------------------------
                                                                           constructeur eventuel
-------------------------------------------------------------------------------------------------*/
	/*function wak(& $controller) {
		// appel du constructeur parent
		$const=get_parent_class($this);
		parent::$const($controller);
		// suite
	}*/
/*-------------------------------------------------------------------------------------------------
                                                                                 methodes publiques
a lier dans components/controller.wak-core.php et api.wak-core.php
-------------------------------------------------------------------------------------------------*/
	function & xmlentities($str) {
		$str=str_replace('&','&amp;',$str);
		$str=str_replace('"','&quot;',$str);
		$str=str_replace("'",'&apos;',$str);
		$str=str_replace('<','&lt;',$str);
		$str=str_replace('>','&gt;',$str);
		return $str;
	}
	function & xmlentitiesDecode($str) {
		$str=str_replace('&quot;','"',$str);
		$str=str_replace('&apos;',"'",$str);
		$str=str_replace('&lt;','<',$str);
		$str=str_replace('&gt;','>',$str);
		$str=str_replace('&amp;','&',$str);
		return $str;
	}
/*-------------------------------------------------------------------------------------------------
                                                                                   méthodes privées
-------------------------------------------------------------------------------------------------*/

/*-------------------------------------------------------------------------------------------------

-------------------------------------------------------------------------------------------------*/
}
?>
